static QVector<arglist_t> brauniger_iq_args = {
};
+/* master process: don't convert anything */
+
ff_vecs_t brauniger_iq_vecs = {
ff_type_serial,
{ ff_cap_none, ff_cap_read, ff_cap_none},
nullptr,
nullptr,
&brauniger_iq_args,
- CET_CHARSET_UTF8, 1 /* master process: don't convert anything | CET-REVIEW */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
ff_write write;
ff_exit exit;
QVector<arglist_t>* args;
- QString encode;
- int fixed_encode;
position_ops_t position_ops;
};
QString get_filename(const QString& fname); /* extract the filename portion */
-/*
- * Character encoding transformations.
- */
-
-#define CET_CHARSET_ASCII "US-ASCII"
-#define CET_CHARSET_UTF8 "UTF-8"
-#define CET_CHARSET_MS_ANSI "windows-1252"
-
/* this lives in gpx.c */
gpsbabel::DateTime xml_parse_time(const QString& dateTimeString);
};
}
- QString get_encode() const override
- {
- return CET_CHARSET_ASCII;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void read() override;
void rd_deinit() override;
#include <cstdint> // for uint32_t, uint16_t, uint8_t, int16_t, int32_t
-#include "defs.h" // for arglist_t, ff_cap, Waypoint, ARG_NOMINMAX, ARGTYPE_BOOL, ff_cap_none, ARGTYPE_INT, ARGTYPE_STRING, CET_CHARSET_UTF8, ff_cap_read, ff_cap_write, ff_type, ff_type_file
+#include "defs.h" // for arglist_t, ff_cap, Waypoint, ARG_NOMINMAX, ARGTYPE_BOOL, ff_cap_none, ARGTYPE_INT, ARGTYPE_STRING, ff_cap_read, ff_cap_write, ff_type, ff_type_file
#include "format.h" // for Format
#include "gbfile.h" // for gbfile, gbsize_t
};
}
- QString get_encode() const override
- {
- return CET_CHARSET_UTF8;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
virtual ff_type get_type() const = 0;
virtual QVector<ff_cap> get_cap() const = 0;
- virtual QString get_encode() const = 0;
- virtual int get_fixed_encode() const = 0;
QString get_name() const
{
format_skeleton_write,
format_skeleton_exit,
&format_skeleton_args,
- CET_CHARSET_ASCII, 0, /* ascii is the expected character set */
- /* not fixed, can be changed through command line parameter */
- NULL_POS_OPS, // Unless you do realtime positioning
- nullptr // name. Not used by modules.
+ NULL_POS_OPS // Unless you do realtime positioning
};
/**************************************************************************/
rw_init(const QString& fname)
{
receiver_must_upper = 1;
- const char* receiver_charset = CET_CHARSET_ASCII;
+ const char* receiver_charset = "US-ASCII";
if (!mkshort_handle) {
mkshort_handle = mkshort_new_handle();
snwhiteopt = xstrdup("1");
receiver_must_upper = 0;
/* This might be 8859-1 */
- receiver_charset = CET_CHARSET_MS_ANSI;
+ receiver_charset = "windows-1252";
break;
case 291: /* GPSMAP 60CS, probably others */
case 1095: /* GPS 72H */
case 463: /* Quest 2 */
receiver_must_upper = 0;
receiver_short_length = 30;
- receiver_charset = CET_CHARSET_MS_ANSI;
+ receiver_charset = "windows-1252";
break;
case 577: // Rino 530HCx Version 2.50
receiver_must_upper = 0;
break;
case 429: // Streetpilot i3
receiver_must_upper = 0;
- receiver_charset = CET_CHARSET_MS_ANSI;
+ receiver_charset = "windows-1252";
receiver_short_length = 30;
break;
case 484: // Forerunner 305
data_write,
nullptr,
&garmin_args,
- CET_CHARSET_ASCII, 0,
{ pvt_init, pvt_read, rw_deinit, nullptr, nullptr, nullptr }
};
};
}
- QString get_encode() const override
- {
- return CET_CHARSET_ASCII;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
#include <cstdint> // for int32_t, int16_t, uint16_t
#include <ctime> // for time_t
-#include "defs.h" // for arglist_t, ARG_NOMINMAX, ff_cap, Waypoint, ARGTYPE_BOOL, ARGTYPE_STRING, ff_cap_none, ARGTYPE_FILE, ARGTYPE_INT, CET_CHARSET_MS_ANSI, bounds, ff_cap_read, ff_cap_write, ff_type, ff_type_file, short_handle
+#include "defs.h" // for arglist_t, ARG_NOMINMAX, ff_cap, Waypoint, ARGTYPE_BOOL, ARGTYPE_STRING, ff_cap_none, ARGTYPE_FILE, ARGTYPE_INT, bounds, ff_cap_read, ff_cap_write, ff_type, ff_type_file, short_handle
#include "format.h" // for Format
#include "garmin_fs.h" // for garmin_fs_t
#include "gbfile.h" // for gbfile
};
}
- QString get_encode() const override
- {
- return CET_CHARSET_MS_ANSI; /* WIN-CP1252 */
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
memset(>xt_flags, 0, sizeof(gtxt_flags));
fout = new gpsbabel::TextStream;
- fout->open(fname, QIODevice::WriteOnly, MYNAME, "Windows-1252");
+ fout->open(fname, QIODevice::WriteOnly, MYNAME, "windows-1252");
gtxt_flags.metric = (toupper(*get_option_val(opt_dist, "m")) == 'M');
gtxt_flags.celsius = (toupper(*get_option_val(opt_temp, "c")) == 'C');
memset(>xt_flags, 0, sizeof(gtxt_flags));
fin = new gpsbabel::TextStream;
- fin->open(fname, QIODevice::ReadOnly, MYNAME, "Windows-1252");
+ fin->open(fname, QIODevice::ReadOnly, MYNAME, "windows-1252");
memset(&header_ct, 0, sizeof(header_ct));
datum_index = -1;
}
}
+/*
+ * The file encoding is windows-1252.
+ * Conversion between windows-1252 and utf-16 is handled by the stream.
+ * Conversion between utf-16 and utf-8 is handled by this format.
+ * Let main know char strings have already been converted to utf-8
+ * so it doesn't attempt to re-convert any char strings including gmsd data.
+ */
+
ff_vecs_t garmin_txt_vecs = {
ff_type_file,
FF_CAP_RW_ALL,
garmin_txt_write,
nullptr,
&garmin_txt_args,
- /*
- * The file encoding is Windows-1252, a.k.a CET_CHARSET_MS_ANSI.
- * Conversion between Windows-1252 and utf-16 is handled by the stream.
- * Conversion between utf-16 and utf-8 is handled by this format.
- * Let main know char strings have already been converted to utf-8
- * so it doesn't attempt to re-convert any char strings including gmsd data.
- */
- CET_CHARSET_UTF8, 0
- , NULL_POS_OPS
+ NULL_POS_OPS
};
#endif // CSVFMTS_ENABLED
/**************************************************************************/
+/* ascii is the expected character set */
+/* not fixed, can be changed through command line parameter */
+
ff_vecs_t format_garmin_xt_vecs = {
ff_type_file,
{
nullptr,
nullptr,
&format_garmin_xt_args,
- CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
- /* not fixed, can be changed through command line parameter */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
/**************************************************************************/
#include <QString> // for QString
#include <QVector> // for QVector
-#include "defs.h" // for arglist_t, Waypoint, route_head, ARGTYPE_BOOL, ARGTYPE_INT, ARG_NOMINMAX, bounds, CET_CHARSET_MS_ANSI, FF_CAP_RW_ALL, ff_cap, ff_type, ff_type_file, short_handle
+#include "defs.h" // for arglist_t, Waypoint, route_head, ARGTYPE_BOOL, ARGTYPE_INT, ARG_NOMINMAX, bounds, FF_CAP_RW_ALL, ff_cap, ff_type, ff_type_file, short_handle
#include "format.h" // for Format
#include "garmin_fs.h" // for garmin_fs_t
#include "garmin_tables.h" // for gt_waypt_classes_e
return FF_CAP_RW_ALL;
}
- QString get_encode() const override
- {
- return CET_CHARSET_MS_ANSI;
- }
-
- int get_fixed_encode() const override
- {
- /* O.K.: changed to NON-FIXED because of utf8 strings since GDB V3 */
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
geo_write,
nullptr,
&geo_args,
- CET_CHARSET_UTF8, 0, /* CET-REVIEW */
NULL_POS_OPS
};
return FF_CAP_RW_ALL;
}
- QString get_encode() const override
- {
- return CET_CHARSET_UTF8;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
};
}
- QString get_encode() const override
- {
- return CET_CHARSET_ASCII;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
gpssim_write,
nullptr,
&gpssim_args,
- CET_CHARSET_ASCII, 0
- , NULL_POS_OPS
+ NULL_POS_OPS
};
return FF_CAP_RW_ALL;
}
- QString get_encode() const override
- {
- return CET_CHARSET_UTF8;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
gtm_write,
nullptr,
>m_args,
- CET_CHARSET_ASCII, 0, /* CET-REVIEW */
NULL_POS_OPS
};
#include <QVector> // for QVector
#include <QXmlStreamAttributes> // for QXmlStreamAttributes
-#include "defs.h" // for arglist_t, ff_cap, route_head, Waypoint, computed_trkdata, ARG_NOMINMAX, ff_cap_read, ARGTYPE_BOOL, ARGTYPE_STRING, CET_CHARSET_ASCII, ff_cap_none, ff_cap_write, ff_type, ff_type_file
+#include "defs.h" // for arglist_t, ff_cap, route_head, Waypoint, computed_trkdata, ARG_NOMINMAX, ff_cap_read, ARGTYPE_BOOL, ARGTYPE_STRING, ff_cap_none, ff_cap_write, ff_type, ff_type_file
#include "format.h" // for Format
#include "gbfile.h" // for gbfile
#include "src/core/datetime.h" // for DateTime
};
}
- QString get_encode() const override
- {
- return CET_CHARSET_ASCII;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
data_write,
nullptr,
nullptr,
- CET_CHARSET_ASCII, 0 /* CET-REVIEW */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
return { ff_cap_write, ff_cap_none, ff_cap_none };
}
- QString get_encode() const override
- {
- return CET_CHARSET_UTF8;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void wr_init(const QString& fname) override;
void write() override;
void wr_deinit() override;
#include <cstdint> // for int32_t, uint32_t
-#include "defs.h" // for ff_cap, arglist_t, ff_cap_read, Waypoint, route_head, ff_cap_write, short_handle, CET_CHARSET_ASCII, ff_type, ff_type_file
+#include "defs.h" // for ff_cap, arglist_t, ff_cap_read, Waypoint, route_head, ff_cap_write, short_handle, ff_type, ff_type_file
#include "format.h" // for Format
#include "gbfile.h" // for gbfile
};
}
- QString get_encode() const override
- {
- return CET_CHARSET_ASCII;
- }
-
- int get_fixed_encode() const override
- {
- return 1;
- }
-
void rd_init(const QString& fname) override {humminbird_rd_init(fname);}
void read() override {humminbird_read();}
void rd_deinit() override {humminbird_rd_deinit();}
};
}
- QString get_encode() const override
- {
- return CET_CHARSET_ASCII;
- }
-
- int get_fixed_encode() const override
- {
- return 1;
- }
-
void rd_init(const QString& fname) override {humminbird_rd_init(fname);}
void read() override {humminbird_read();}
void rd_deinit() override {humminbird_rd_deinit();}
data_write,
nullptr,
&igc_args,
- CET_CHARSET_ASCII, 0 /* CET-REVIEW */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
return FF_CAP_RW_ALL;
}
- QString get_encode() const override
- {
- return CET_CHARSET_UTF8;
- }
-
- int get_fixed_encode() const override
- {
- return 1;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
{
return vec.cap;
}
- QString get_encode() const override
- {
- return vec.encode;
- }
-
- int get_fixed_encode() const override
- {
- return vec.fixed_encode;
- }
private:
ff_vecs_t vec;
return FF_CAP_RW_ALL;
}
- QString get_encode() const override
- {
- return CET_CHARSET_ASCII;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
// GPS logger will only handle tracks - neither waypoints or tracks...
// Actually, some of the Holux devices will read waypoints.
+/* ascii is the expected character set */
+/* not fixed, can be changed through command line parameter */
+
ff_vecs_t mtk_vecs = {
ff_type_serial,
{
nullptr,
nullptr,
&mtk_sargs,
- CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
- /* not fixed, can be changed through command line parameter */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
+/* ascii is the expected character set */
+/* not fixed, can be changed through command line parameter */
+
ff_vecs_t mtk_m241_vecs = {
ff_type_serial,
{
nullptr,
nullptr,
&mtk_sargs,
- CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
- /* not fixed, can be changed through command line parameter */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
/* used for mtk-bin */
},
};
+/* master process: don't convert anything */
+
ff_vecs_t mtk_fvecs = {
ff_type_file,
{ ff_cap_read, ff_cap_read, ff_cap_none },
nullptr,
nullptr,
&mtk_fargs,
- CET_CHARSET_UTF8, 1 /* master process: don't convert anything | CET-REVIEW */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
+/* master process: don't convert anything */
+
ff_vecs_t mtk_m241_fvecs = {
ff_type_file,
{ ff_cap_read, ff_cap_read, ff_cap_none },
nullptr,
nullptr,
&mtk_fargs,
- CET_CHARSET_UTF8, 1 /* master process: don't convert anything | CET-REVIEW */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
/* End file: mtk_logger.c */
/**************************************************************************/
navilink_write,
nullptr,
&navilink_args,
- CET_CHARSET_ASCII, 0 /* CET-REVIEW */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
};
}
- QString get_encode() const override
- {
- return CET_CHARSET_ASCII;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
};
}
- QString get_encode() const override
- {
- return CET_CHARSET_UTF8;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
data_write,
nullptr,
&ozi_args,
- CET_CHARSET_ASCII, 0 /* CET-REVIEW */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
#include <QVector> // for QVector
#include <QtGlobal> // for qint8, quint16, quint8
-#include "defs.h" // for ff_cap, ff_cap_read, ff_cap_none, CET_CHARSET_ASCII, ff_type, ff_type_file, route_head
+#include "defs.h" // for ff_cap, ff_cap_read, ff_cap_none, ff_type, ff_type_file, route_head
#include "format.h" // for Format
#include "formspec.h" // for FormatSpecificData, kFsQstarzBl1000
};
}
- QString get_encode() const override
- {
- return CET_CHARSET_ASCII;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
};
}
- QString get_encode() const override
- {
- return CET_CHARSET_ASCII;
- }
-
- int get_fixed_encode() const override
- {
- return 1;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
/**********************************************************************/
+/* Characters are always encoded in ASCII. Even if the unit is set
+ * to Chinese language, only ASCII characters can be entered.
+ */
+
ff_vecs_t sbn_vecs = {
ff_type_file,
{
nullptr,
nullptr,
&sbn_args,
- /* Characters are always encoded in ASCII. Even if the unit is set
- * to Chinese language, only ASCII characters can be entered. */
- CET_CHARSET_ASCII, 0
- , NULL_POS_OPS
+ NULL_POS_OPS
};
/**********************************************************************/
/**************************************************************************/
+/* ascii is the expected character set */
+/* not fixed, can be changed through command line parameter */
+
ff_vecs_t sbp_vecs = {
ff_type_file,
{
nullptr,
nullptr,
&sbp_args,
- CET_CHARSET_ASCII, 0 /* ascii is the expected character set */
- /* not fixed, can be changed through command line parameter */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
/**************************************************************************/
#include <QString> // for QString
#include <QVector> // for QVector
-#include "defs.h" // for arglist_t, ARGTYPE_STRING, Waypoint, route_head, CET_CHARSET_ASCII, FF_CAP_RW_ALL, ff_cap, ff_type, ff_type_file
+#include "defs.h" // for arglist_t, ARGTYPE_STRING, Waypoint, route_head, FF_CAP_RW_ALL, ff_cap, ff_type, ff_type_file
#include "format.h" // for Format
#if SHAPELIB_ENABLED
#if HAVE_LIBSHAPE
return FF_CAP_RW_ALL;
}
- QString get_encode() const override
- {
- return CET_CHARSET_ASCII;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
#include <cstdint> // for uint8_t, int32_t, uint32_t, uint16_t, int16_t
#include <ctime> // for time_t
-#include "defs.h" // for arglist_t, ARGTYPE_INT, ff_cap, ARG_NOMINMAX, ARGTYPE_STRING, ff_cap_read, ARGTYPE_BOOL, CET_CHARSET_UTF8, ff_cap_none, ff_type, ARGTYPE_OUTFILE, ff_type_serial, Waypoint, ff_type_file, route_head
+#include "defs.h" // for arglist_t, ARGTYPE_INT, ff_cap, ARG_NOMINMAX, ARGTYPE_STRING, ff_cap_read, ARGTYPE_BOOL, ff_cap_none, ff_type, ARGTYPE_OUTFILE, ff_type_serial, Waypoint, ff_type_file, route_head
#include "format.h" // for Format
#include "gbfile.h" // for gbfile
return { ff_cap_read, ff_cap_read, ff_cap_none };
}
- QString get_encode() const override
- {
- return CET_CHARSET_UTF8;
- }
-
- int get_fixed_encode() const override
- {
- return 1;
- }
-
void rd_init(const QString& fname) override {skytraq_rd_init(fname);}
void read() override {skytraq_read();}
void rd_deinit() override {skytraq_rd_deinit();}
return { ff_cap_read, ff_cap_read, ff_cap_none };
}
- QString get_encode() const override
- {
- return CET_CHARSET_UTF8;
- }
-
- int get_fixed_encode() const override
- {
- return 1;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
return { ff_cap_read, ff_cap_read, ff_cap_none };
}
- QString get_encode() const override
- {
- return CET_CHARSET_UTF8;
- }
-
- int get_fixed_encode() const override
- {
- return 1;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
return { ff_cap_none, ff_cap_write, ff_cap_none }; // waypoints, track, route; for now, we just do tracks
}
- QString get_encode() const override
- {
- return CET_CHARSET_ASCII;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void wr_init(const QString& fname) override;
void write() override;
void wr_deinit() override;
return { ff_cap_write, ff_cap_none, ff_cap_none};
}
- QString get_encode() const override
- {
- return CET_CHARSET_ASCII;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void wr_init(const QString& fname) override;
void write() override;
void wr_deinit() override;
tpg_write,
nullptr,
&tpg_args,
- CET_CHARSET_ASCII, 0 /* CET-REVIEW */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
#endif
nullptr,
&tpo2_args,
- CET_CHARSET_ASCII, 0 /* CET-REVIEW */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
/* TPO 3.x format can read waypoints/tracks/routes */
nullptr,
nullptr,
&tpo3_args,
- CET_CHARSET_ASCII, 0 /* CET-REVIEW */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
return FF_CAP_RW_ALL;
}
- QString get_encode() const override
- {
- return CET_CHARSET_UTF8;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;
}
}
+/* Could be US-ASCII, since we only read "0-9,A-Z\n\r" */
+
ff_vecs_t v900_vecs = {
ff_type_file,
{ff_cap_read, ff_cap_read, ff_cap_none}, /* Read only format. May only read trackpoints and waypoints. */
nullptr, /* write */
nullptr,
nullptr, /* args */
- CET_CHARSET_UTF8, 1, /* Could be US-ASCII, since we only read "0-9,A-Z\n\r" */
{nullptr,nullptr,nullptr,nullptr,nullptr,nullptr}
};
data_write,
nullptr,
&vcf_args,
- CET_CHARSET_ASCII, 0 /* CET-REVIEW */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
},
};
+/* master process: don't convert anything */
+
ff_vecs_t wbt_svecs = {
ff_type_serial,
{ ff_cap_read, ff_cap_read, ff_cap_none },
nullptr,
nullptr,
&wbt_sargs,
- CET_CHARSET_UTF8, 1 /* master process: don't convert anything | CET-REVIEW */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
/* used for wbt-bin /and/ wbt-tk1 */
static QVector<arglist_t> wbt_fargs = {
};
+/* master process: don't convert anything */
+
ff_vecs_t wbt_fvecs = {
ff_type_file,
{ ff_cap_none, ff_cap_read, ff_cap_none },
nullptr,
nullptr,
&wbt_fargs,
- CET_CHARSET_UTF8, 1 /* master process: don't convert anything | CET-REVIEW */
- , NULL_POS_OPS
+ NULL_POS_OPS
};
return FF_CAP_RW_WPT; /* This is a bit of a lie for now... */
}
- QString get_encode() const override
- {
- return CET_CHARSET_UTF8;
- }
-
- int get_fixed_encode() const override
- {
- return 0;
- }
-
void rd_init(const QString& fname) override;
void read() override;
void rd_deinit() override;